# -*- coding: utf-8 -*-
from db.mysql import MysqlClient
from itertools import product
from common.helper import Helper

name = "E生平安·津贴宝"
mysql = MysqlClient()
prices = ["100.00", "300.00", "500.00"]

plan = {

    "days": ["1y"],
    "people_count": ["1"],
    "accident_hospital": ["9000", "27000", "45000"],
}
num = 0
for v in product(plan["days"], plan["people_count"], plan["accident_hospital"]):
    data = Helper.formatProductInfo(plan, v)
    data["name"] = name
    data["company"] = "平安保险"
    data["price"] = prices[num]
    num += 1
    Helper.mergeTable("accident", mysql, data)
